package cn.gailvlun.gll.presentation.emotion.drawer;

import android.content.Context;

import org.jetbrains.annotations.NotNull;

import cn.gailvlun.gll.R;
import cn.gailvlun.gll.net.emotion.Emotion;
import cn.gailvlun.gll.presentation.emotion.core.BaseAdapter;



public class EmotionCalendarAdapter extends BaseAdapter<Emotion> {
    public EmotionCalendarAdapter(Context context) {
        super(context);
        addViewTypeToLayoutMap(Type.EMPTY.ordinal(), R.layout.item_emotion_calendar_empty);
        addViewTypeToLayoutMap(Type.CONTENT.ordinal(), R.layout.item_emotion_calendar_detail);
    }

    public enum Type {
        EMPTY, CONTENT
    }


    @Override
    public boolean removeCondition(@NotNull Emotion whichItem, @NotNull Emotion certainItem) {
        return whichItem.getId() == certainItem.getId() || super.removeCondition(whichItem, certainItem);
    }

    @Override
    public boolean notifyItemChangedCondition(@NotNull Emotion whichItem, @NotNull Emotion certainItem) {
        return whichItem.getId() == certainItem.getId() || super.notifyItemChangedCondition(whichItem, certainItem);
    }
}
